From: Bastien Nocera Date: Sat, 21 Jul 2018 12:50:37 +0000 (+0200) Subject: test: Fix compile-time warnings X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~33^2~23 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=5b527d69100a1d275ceea44ffb693a4eaf309d73;p=gtk%2B3.0.git test: Fix compile-time warnings testsuite/gtk/notify.c: In function ‘test_type’: testsuite/gtk/notify.c:434:14: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GtkSettings *’ {aka ‘struct _GtkSettings *’} [-Wincompatible-pointer-types] instance = g_object_ref (gtk_settings_get_default ()); ^ testsuite/gtk/notify.c:443:16: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GdkWindow *’ {aka ‘struct _GdkWindow *’} [-Wincompatible-pointer-types] instance = g_object_ref (gdk_window_new (NULL, &attributes, 0)); ^ --- diff --git a/testsuite/gtk/notify.c b/testsuite/gtk/notify.c index 1970e00496..201a44e17b 100644 --- a/testsuite/gtk/notify.c +++ b/testsuite/gtk/notify.c @@ -431,7 +431,7 @@ test_type (gconstpointer data) klass = g_type_class_ref (type); if (g_type_is_a (type, GTK_TYPE_SETTINGS)) - instance = g_object_ref (gtk_settings_get_default ()); + instance = G_OBJECT (g_object_ref (gtk_settings_get_default ())); else if (g_type_is_a (type, GDK_TYPE_WINDOW)) { GdkWindowAttr attributes; @@ -440,7 +440,7 @@ test_type (gconstpointer data) attributes.event_mask = 0; attributes.width = 100; attributes.height = 100; - instance = g_object_ref (gdk_window_new (NULL, &attributes, 0)); + instance = G_OBJECT (g_object_ref (gdk_window_new (NULL, &attributes, 0))); } else if (g_str_equal (g_type_name (type), "GdkX11Cursor")) instance = g_object_new (type, "display", display, NULL);